Use the Defines List

The Defines list consists of defined constants, (an expression with a fixed value).

  • Defines are:
    • Both pre-defined (internal) and user-created (global and local).
    • Used to determine which parts of a program's code are compiled using an ifdef statement.
    • This creates more efficient code for a given machine type.
    • Example: You can write a program that covers many machine types but compile for a specific machine with more efficient code.

Defined constants have these levels of scope:

Level

Scope

Internal Defines

All the projects present on your machine.

Global Defines

All the programs in your project.

These are user-defined.

Local Definitions

Only the current program currently open.


  • Pay special attention to the Data Types of variables used in the expression to guarantee precision when evaluating the expression.
  • Example: When mixing LREAL and REAL, the precision is that of REAL.

KAS-IDE supports Alias Definitions.